Forum Discussion
How to use Power BI Rest API without GUI authentication (redirect uri)
- 10 years ago
You can use the user name and password flow that AAD supports. This 3rd party client library has an example: https://github.com/Vtek/PowerBI.Api.Client
Hi there,
What do you use for the Username/Password for your solution.
We use SSO at our company so not sure what account I can use.
I currently use my personal credentials. We're planning a change soon. What sucks is that PowerBI doesn't really allow multiple users to build reports off an API dataset. Our plan is to get a shared Service Account, pay for a license for the service account, and keep the password private to our group.
- Phil_Seamark10 years ago
Microsoft Employee
So in my case, when I log into Power BI using our company SSO, I use the my internal company AD network username and password.
Are you saying these should work ok?
Oh and I take it your code is designed to work with a Web app? I'm trying to use and SSIS script task to push rows up to a Dataset\table.
- heitzmanjared10 years agoFrequent Visitor
The big catch is that you have to give permissions the first time. In my case, the account that "owns" the dataset is my personal account. I had to set up my app to use traditional authentication wiht a redirect, and go through the typical permisson acceptance to let PowerBI know that I approve the permissions I identified when registering the app. Once i did that, I was able to use my username and password and make an automatic call every 30 minutes with no user intervention. If this isn't clear, please let me know and we can have a quick call to clarify
- Phil_Seamark10 years ago
Microsoft Employee
I can handle that for now.
I take it you used a web-app rather than the native-app given there is a client-secret in your code.